// 该文件专门用于创建整个应用的路由器
import { createRouter, createWebHashHistory } from 'vue-router';

//引入组件
import HomePage from '../components/HomePage.vue';
import GameIntroduce from '../components/GameIntroduce.vue';
import AuthorName from '../components/AuthorName.vue';

import GameOne from '../components/GameOne.vue';
import GameTogether from '../components/GameTogether.vue';

const routerHistory = createWebHashHistory();

const router = createRouter({
	history: routerHistory,
	routes: [
		{
			path: '/',
			component: HomePage,
		},
		{
			name: 'homepage',
			path: '/homepage',
			component: HomePage,
		},
		{
			name: 'onegame',
			path: '/onegame',
			component: GameOne,
		},
		{
			path: '/gameTogether',
			component: GameTogether,
		},
		{
			path: '/introduce',
			component: GameIntroduce,
		},
		{
			path: '/author',
			component: AuthorName,
		},
	],
});

export default router;
